package memnto.example;

import java.util.List;
import java.util.Set;
import java.util.Vector;

/**
 * @author Chen Guang
 * @date 2019/4/17 0017 上午 10:43
 */
public class Test {
    public static void main(String[] args) {
        //大战boss前 赋予初始值
        PlayRole playRole = new PlayRole(100,100,100);
        playRole.stateDisplay();

        //保存进度
        RoleStateCaretaker caretaker = new RoleStateCaretaker();
        caretaker.setRoleMemento(playRole.saveRoleState());
        playRole.saveRoleState();

        //大战boss后，损耗严重
        playRole.fight();
        playRole.stateDisplay();

        playRole.recoveryState(caretaker.getRoleMemento());
        playRole.stateDisplay();
    }
}
